package Control;

import Entity.Job_Registration;
import Form.Job_RegistrationForm;
import Form.Job_jobRegistrationForm;

public class Job_UserRegistration_Controller {

	private Job_Registration userJob = new Job_Registration();
	private Job_Registration jobRegi;
	 
	private Job_jobRegistrationForm parser;

	
	public Job_UserRegistration_Controller(Job_jobRegistrationForm parser) {
		setParser(parser);
		jobRegi = parser.getParser().getControl().getSelectedJob();
		parser.getJobId().setText(jobRegi.getJobID());
	}

	public Job_jobRegistrationForm getParser() {
		return parser;
	}

	public void setParser(Job_jobRegistrationForm parser) {
		this.parser = parser;
	} 
	
	public void createJob(){ 	
		userJob.setJobID(getParser().getJobId().getText()); 
		userJob.setNric(CommonControls.getUser().getNric()); 
	
	userJob.registerForJob();
	}
}
